﻿package Message.BroadCast
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SEntityUpdate extends IMessageBase
    {
        public var entityId:SEntityId;
        public var propertyUpdates:Array;
        public const _type:int = 11006;
        public static var _regist:SEntityUpdate = new SEntityUpdate(true);

        public function SEntityUpdate(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SEntityUpdate();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            SeqAttributeUpdateHelper.write(param1, this.propertyUpdates);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.propertyUpdates = SeqAttributeUpdateHelper.read(param1);
            return;
        }// end function

    }
}
